
#列表的真正意义的复制

#1。假复制  用   =    进行赋值    错误的复制列表操作
names = ['mike','mary','jan','jack']
names_源文件 =

stu_id = [10001,10002,10003,10004,10008,10001,10009,10010,10001]
#1.copy()很重要
#思考，赋值是真正的复制吗？  赋值（=） <=> copy?不等价
stu_id_matedata = stu_id
print('stu_id:',stu_id,'\n','stu_id_matedata:',stu_id_matedata)

#实验1  赋值
#stu_id.pop(1)
#print('stu_id:',stu_id,'\n','stu_id_matedata:',stu_id_matedata)

#实验2  copy()
#stu_id.matedata = stu_id.copy()
#stu_id.pop(1)
#print('stu_id:',stu_id,'\n','stu_id_matedata:',stu_id_matedata)

#实验3  切片实现复制
stu_id_matedata = stu_id[:]
stu_id.pop(1)
print('stu_id:',stu_id,'\n','stu_id_matedata:',stu_id_matedata)
